Upgrade Cypress stack to v15, migrate Dashboard E2E config/specs for compatibility, resolve merge conflicts, constrain Cypress peer range, and harden setup user creation#17710
Conversation
Agent-Logs-Url: https://github.com/rancher/dashboard/sessions/f8dbf4fe-499d-41b8-9b72-5db803459bf8 Co-authored-by: cnotv <5009481+cnotv@users.noreply.github.com>
Agent-Logs-Url: https://github.com/rancher/dashboard/sessions/f8dbf4fe-499d-41b8-9b72-5db803459bf8 Co-authored-by: cnotv <5009481+cnotv@users.noreply.github.com>
|
@copilot resolve the merge conflicts in this pull request |
There was a problem hiding this comment.
Pull request overview
This PR upgrades the Rancher Dashboard E2E testing stack from Cypress 11 to Cypress 15 and updates the Cypress configuration, plugin wiring, and specs to match Cypress 12+ compatibility requirements (notably testIsolation boolean semantics and updated @cypress/grep integration).
Changes:
- Upgraded Cypress and related ecosystem dependencies across root,
cypress/, andshell/packages (plus lockfile updates). - Migrated E2E specs from
testIsolation: 'off'/'on'totestIsolation: false/trueand updatedcy.exec()assertions to useexitCode. - Updated
@cypress/grepintegration entrypoints and added typing fortagsin Cypress suite/test config overrides.
Reviewed changes
Copilot reviewed 92 out of 96 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| shell/yarn.lock | Updates transitive dependencies for Cypress 15 and related tooling in shell/. |
| shell/package.json | Bumps cypress dependency used by the shell/ workspace to 15.14.2. |
| package.json | Upgrades Cypress/tooling dependencies in the root workspace (Cypress, grep, webpack dev server, reporters, etc.). |
| cypress/tsconfig.json | Removes deprecated @cypress/grep types entry from Cypress TS config. |
| cypress/support/e2e.ts | Migrates @cypress/grep support registration to the new entrypoint and keeps support setup compatible with Cypress 15. |
| cypress/package.json | Upgrades Cypress/tooling dependencies in the @rancher/cypress package and adjusts Cypress peer dependency range. |
| cypress/globals.d.ts | Adds explicit tags typing to Cypress suite/test config overrides for @cypress/grep compatibility. |
| cypress/base-config.ts | Updates @cypress/grep plugin wiring and removes deprecated Cypress config options. |
| cypress/e2e/tests/priority/oidc-provider-setup.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/priority/no-vai-setup.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/users-and-auth/users.spec.ts | Updates nested suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/users-and-auth/user-retention.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/users-and-auth/roles.spec.ts | Updates nested suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/users-and-auth/last-login-sort.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/users-and-auth/index.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/user-menu/account-api-keys.spec.ts | Updates suite (and commented skip suite) testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/manager/repositories.spec.ts | Updates multiple suites’ testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/manager/pod-security-policy-templates.spec.ts | Updates suite (and commented skip suite) testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/manager/pod-security-admissions.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/manager/node-drivers.spec.ts | Updates suite (and commented skip suite) testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/manager/machines.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/manager/machine-sets.spec.ts | Updates suites’ testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/manager/machine-deployments.spec.ts | Updates suites’ testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/manager/kontainer-drivers.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/manager/jwt-authentication.spec.ts | Updates suites’ testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/manager/hosted-providers.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/manager/eks-cluster-provisioning.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/manager/cluster-provisioning-azure-rke2.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/manager/cluster-manager.spec.ts | Updates suite testIsolation override to boolean syntax and cy.exec() assertions to exitCode. |
| cypress/e2e/tests/pages/manager/aks-cluster-provisioning.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/global-settings/settings.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/global-settings/settings-p2.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/global-settings/performance.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/global-settings/index.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/global-settings/home-links.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/global-settings/feature-flags.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/global-settings/branding.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/global-settings/banners.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/generic/version.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/generic/prime.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/generic/links.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/generic/home.spec.ts | Updates nested suites’ testIsolation override to boolean syntax and adjusts window.open stubbing. |
| cypress/e2e/tests/pages/generic/about.spec.ts | Migrates testIsolation from 'on' to true. |
| cypress/e2e/tests/pages/fleet/resources/workspaces.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/fleet/resources/gitrepo-restrictions.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/fleet/resources/cluster-registration-tokens.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/fleet/resources/bundles.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/fleet/resources/bundle-namespace-mappings.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/fleet/helmop.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/fleet/gitrepo.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/fleet/fleet-clusters.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/fleet/cluster-groups.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer2/workloads/statefulsets.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer2/workloads/pods.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer2/workloads/jobs.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer2/workloads/deployments.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer2/workloads/daemonsets.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer2/workloads/cronjobs.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer2/storage/storage-classes.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer2/storage/secrets.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer2/storage/project-secrets.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer2/storage/persistent-volumes.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer2/storage/persistent-volume-claims.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer2/storage/configmap.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer2/storage/configmap-detail-title-bar.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer2/resource-search.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer2/nodes/node-list.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer2/nodes/node-detail.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer2/namespace-picker.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer2/index.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer2/describe-resource.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer/service-discovery/services.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer/service-discovery/ingress.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer/service-discovery/horizontal-pod-autoscalers.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer/policy/network-policy.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer/more-resources/yaml/no-form-resource.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer/more-resources/rbac/roles.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer/more-resources/rbac/role-bindings.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer/more-resources/rbac/cluster-roles.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer/more-resources/rbac/cluster-role-bindings.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer/more-resources/fleet/contents.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer/more-resources/core/service-accounts.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer/more-resources/api/custom-resource-definitions.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer/manager/index.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer/dashboard/events.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer/dashboard/cluster-dashboard.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer/dashboard/certificates.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/explorer/apps/index.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/charts/opa-gatekeeper.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/charts/monitoring-istio.spec.ts | Updates nested suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/charts/logging.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/charts/compliance.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/pages/charts/chart-install-wizard.spec.ts | Updates suite testIsolation override to boolean syntax. |
| cypress/e2e/tests/accessibility/shell.spec.ts | Updates nested suite testIsolation override to boolean syntax. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: cnotv <5009481+cnotv@users.noreply.github.com>
Resolved by merging latest |
Agent-Logs-Url: https://github.com/rancher/dashboard/sessions/60cb8a5e-d344-4552-9351-50f5db7a6f70 Co-authored-by: cnotv <5009481+cnotv@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot investigate on why E2E are failing. |
I investigated the failing E2E runs on this branch (
This is reproducible across previous PR SHAs too ( |
|
@copilot attempt E2E fix |
Agent-Logs-Url: https://github.com/rancher/dashboard/sessions/9fa41a93-9b18-44cc-8ed0-2cc5d1c6965d Co-authored-by: cnotv <5009481+cnotv@users.noreply.github.com>
Agent-Logs-Url: https://github.com/rancher/dashboard/sessions/9fa41a93-9b18-44cc-8ed0-2cc5d1c6965d Co-authored-by: cnotv <5009481+cnotv@users.noreply.github.com>
Implemented an E2E stabilization attempt in Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot List it in the PR all the new features from the pre-existing versions to Cypress 15 and cypress-grep 6. |
Updated the PR description with a detailed checklist of the new capabilities introduced across Cypress 12→15 and Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot write a report on why the E2E tests are randomly failing |
Summary
This PR updates Rancher Dashboard from Cypress 11 to Cypress 15, applies required Cypress compatibility migrations, resolves merge conflicts, constrains Cypress peer dependency to the supported major, and adds an E2E stabilization fix for setup reruns.
Occurred changes and/or fixed issues
Dependency upgrades
package.jsoncypress/package.jsonshell/package.jsonyarn.lock,cypress/yarn.lock,shell/yarn.lock).Cypress runtime/config migration
testIsolationusage from string values to booleans across E2E specs.experimentalSessionAndOriginvideoUploadOnPassesPlugin/type compatibility updates
@cypress/grepintegration to current plugin/support entrypoints.@cypress/greptype library reference from Cypress TS config.tagstyping for suite/test config overrides in Cypress globals.cy.exec()result typing and stubbing adjustments).Merge conflict resolution
masterinto this branch to clear PR conflicts.yarn.lockconflict while preserving Cypress upgrade changes.Peer dependency compatibility hardening
cypress/package.jsonpeer dependency for Cypress from>=15.14.2to^15.14.2to prevent unintended Cypress 16+ adoption for package consumers.E2E stabilization fix
cypress/e2e/tests/setup/rancher-setup.spec.tsso theCreate standard usersetup step first checks whetherstandard_useralready exists and skips creation if present.Technical notes summary
Cypress 12+ isolation syntax migration
@cypress/grep plugin wiring
Cypress exec return type updates
result.codetoresult.exitCodewhere applicable.Setup idempotency adjustment
management.cattle.io.usersin setup before creatingstandard_user.username already exists.Feature highlights from pre-upgrade stack to Cypress 15 / @cypress/grep 6
cy.session()andcy.origin()moved to GA;experimentalSessionAndOriginremoved;testIsolationenabled by default.videoUploadOnPassesremoved; video defaults updated.cy.origin()requirements for cross-origin flows; modernized support matrix and CT defaults.cy.exec()coderenamed toexitCode; additional webpack 4-era deprecations.--envto--expose(Cypress.env()deprecation path), while preserving tag/title/spec filtering workflows.Areas or cases that should be tested
TEST_ONLY,TEST_SKIP,GREP_TAGS) with the upgraded Cypress/grep stack.testIsolation: falsesuites (state reuse across tests).cypress-mochawesome-reporter, terminal report) in CI runs.rancher-setup.spec.ts, especiallyCreate standard user.@rancher/cypresspeer dependency resolution (Cypress v15 accepted, v16 rejected).@cypress/greprun-time filtering with--exposeoptions in CI/local scripts where applicable.Areas which could experience regressions
testIsolationstring config semantics.Screenshot/Video
N/A (dependency/config/test infrastructure update; no UI behavior changes).
Checklist
Admin,Standard UserandUser Base